#include <iostream>
#include <string>

void printMenu()
{
    std::cout << "\n"
              << std::string(50, '=') << std::endl;
    std::cout << "🏗️  简单数据库演示" << std::endl;
    std::cout << std::string(50, '=') << std::endl;
    std::cout << "1. 📊 显示状态" << std::endl;
    std::cout << "2. 🏗️  创建表" << std::endl;
    std::cout << "3. ➕ 插入记录" << std::endl;
    std::cout << "4. 🔍 查询记录" << std::endl;
    std::cout << "0. 🚪 退出系统" << std::endl;
    std::cout << std::string(50, '=') << std::endl;
    std::cout << "请选择操作 (0-4): ";
}

int main()
{
    std::cout << "🚀 简单数据库演示启动" << std::endl;
    std::cout << "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" << std::endl;

    int choice;
    do
    {
        printMenu();
        std::cin >> choice;

        switch (choice)
        {
            case 1:
                std::cout << "\n📊 系统状态正常" << std::endl;
                break;
            case 2:
                std::cout << "\n🏗️  创建表功能" << std::endl;
                std::cout << "表创建成功！" << std::endl;
                break;
            case 3:
                std::cout << "\n➕ 插入记录功能" << std::endl;
                std::cout << "记录插入成功！" << std::endl;
                break;
            case 4:
                std::cout << "\n🔍 查询记录功能" << std::endl;
                std::cout << "找到记录：alice, 18岁" << std::endl;
                break;
            case 0:
                std::cout << "\n👋 感谢使用，再见!" << std::endl;
                break;
            default:
                std::cout << "\n❌ 无效选择，请输入 0-4 之间的数字!" << std::endl;
        }

        if (choice != 0)
        {
            std::cout << "\n按回车键继续...";
            std::cin.ignore();
            std::cin.get();
        }

    } while (choice != 0);

    return 0;
}
